//
//  KLGoodDetailModel.m
//  KunLun
//
//  Created by Mac on 2017/12/14.
//  Copyright © 2017年 stoneobs@icloud.com. All rights reserved.
//

#import "KLGoodDetailModel.h"

@implementation KLGoodDetailModel
+ (NSDictionary *)mj_replacedKeyFromPropertyName{
    return @{@"goodID":@"id"};
}
- (CGFloat)total_price{
    if (!self.num) {
        return [self.price floatValue] * self.bargain_price.floatValue * 0.01;
    }
    return  self.num * [self.price floatValue] * self.bargain_price.floatValue * 0.01;
}
- (NSInteger)num{
    if (!_num) {
        return 1;
    }
    return _num;
}
@end
